import pySerialForAt

xe = pySerialForAt.enhaneSerialbydlx()
#xe =pySerialForAt.Serial()
xe.Open_Port("COM3",115200)
data = xe._send_and_recv_confirm_single_key("AT","OK")
if data[0]:
    print("执行成功!")
    print(data[1])
try:    
    xe._send_and_recv_confirm_single_key_while("AT+SCPI?","GSM",30)
except Exception as e:
    print("超时{}".format(e.args))